// theme/theme.go
package theme

import (
	_ "embed"
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/theme"
	"image/color"
)

//go:embed fonts/simhei.ttf
var simHeiTtf []byte

var chineseFont = &fyne.StaticResource{
	StaticName:    "SimHei.ttf",
	StaticContent: simHeiTtf,
}

type MyTheme struct{}

func (m *MyTheme) Font(s fyne.TextStyle) fyne.Resource {
	return chineseFont
}

func (m *MyTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color {
	return theme.DefaultTheme().Color(name, variant)
}

func (m *MyTheme) Icon(name fyne.ThemeIconName) fyne.Resource {
	return theme.DefaultTheme().Icon(name)
}

func (m *MyTheme) Size(name fyne.ThemeSizeName) float32 {
	return theme.DefaultTheme().Size(name)
}
